<%--
  Created by IntelliJ IDEA.
  User: hanfei
  Date: 18/6/26
  Time: 下午5:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>理赔详情管理</title>
    <link rel="stylesheet" href="${allServerPath}static/layui/layui/css/layui.css">
    <link rel="stylesheet" href="${allServerPath}static/layui/css/formSelects-v4.css">
    <style>
        .query-condition {
            margin-top: 15px;
        }
    </style>
</head>
<body style="background-color: #f0f2f5;">
<div style="padding: 15px;margin: 15px;background-color: #fff;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>理赔详情管理</legend>
    </fieldset>

    <table class="layui-hide" id="studentsInfo" lay-filter="demo" lay-data="{height: 'full-200'}">
    </table>
</div>

<script src="${allServerPath}static/layui/layui/layui.js"></script>
<script>
    layui.config({
        base: '${allServerPath}static/layui/build/js/'
    }).extend({
        formSelects: 'formSelects-v4.min'
    }).use(['table', 'jquery', 'element', 'formSelects'], function () {
        var table = layui.table,
            $ = layui.jquery,
            formSelects = layui.formSelects,
            element = layui.element;

        table.render({
            elem: '#studentsInfo'
            , url: '${allServerPath}web/listByPlanName.htmls?t=' + Date.parse(new Date())
            , cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , cols: [[
                {field: 'planName', title: '险种名称', align: 'center'}
                , {field: 'brand', title: '保险公司', align: 'center'}
                , {field: 'company', title: '驾校', align: 'center'}
                , {field: 'totalClaimMoney', title: '理赔金额', align: 'center'}
                , {field: 'totalBuyMoney', title: '订单金额', align: 'center'}
                , {field: 'rate', title: '赔付率', align: 'center'}
            ]]
            ,
            where: {
                "planName": '${planName}',
                "brand": '${brand}'
            }
            , response: {
                statusName: 'code' //数据状态的字段名称，默认：code
                , statusCode: 200 //成功的状态码，默认：0
                , msgName: 'message' //状态信息的字段名称，默认：msg
                , countName: 'total' //数据总数的字段名称，默认：count
                , dataName: 'data' //数据列表的字段名称，默认：data
            }, //如果无需自定义数据响应名称，可不加该参数
            done: function (res, curr, count) {
                //如果是异步请求数据方式，res即为你接口返回的信息。
                //如果是直接赋值的方式，res即为：{data: [], count: 99} data为当前页数据、count为数据总长度
                console.log(res);

                //得到当前页码
                console.log(curr);

                //得到数据总量
                console.log(count);
            },
            text: {
                none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            }
        });

    })

</script>
</body>
</html>
